package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.DataDictionaryEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/1/31 9:34
 * @since v1.0
 */
public interface DataDictionaryDao {
    DataDictionaryEntity getByType(@Param("type") Integer type, @Param("corpid") String corpid);

    Integer update(@Param("id") Long id, @Param("corpid") String corpid, @Param("data") String data);

    Integer insert(DataDictionaryEntity entity);

    DataDictionaryEntity getDefaultByType(@Param("type") Integer type);

    DataDictionaryEntity getByKey(@Param("key") Long id, @Param("corpid") String corpid);

    List<DataDictionaryEntity> findEntitys(@Param("param") Map<String,Object> param);

    void updateBatch(@Param("corpid") String corpid, @Param("updateMap") Map<Long, String> updateMap);

    void insertBatch(@Param("list") List<DataDictionaryEntity> list);

    void updateBatchText(@Param("list") List<DataDictionaryEntity> dataDictionaryEntityList, @Param("corpid") String corpid);
}
